<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns:yui="http://yuilibrary.com/rdf/1.0/yui.rdf#">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	<title>API: datatype   (YUI Library)</title>

	<link rel="stylesheet" type="text/css" href="assets/reset-fonts-grids-min.css" />
	<link rel="stylesheet" type="text/css" href="assets/api.css" />

    <script type="text/javascript" src="assets/api-js"></script>
    <script type="text/javascript" src="assets/ac-js"></script>
</head>

<body id="yahoo-com">

<div id="doc3" class="yui-t2">
	<div id="hd">
        <h1><a href="http://developer.yahoo.com/yui/" title="Yahoo! UI Library">Yahoo! UI Library</a></h1>
        <h3>datatype&nbsp; <span class="subtitle">3.0.0b1</span></h3>
        <a href="./index.html" title="Yahoo! UI Library">Yahoo! UI Library</a> 
            &gt; <a href="./module_datatype.html" title="datatype">datatype</a>
                
                
        <form onsubmit="return false">
            <div id="propertysearch">
                Search: <input autocomplete="off" id="searchinput" />
                <div id="searchresults">
                    &nbsp;
                </div>
            </div>
        </form>
	</div>

	<div id="bd">
		<div id="yui-main">
			<div class="yui-b">
            <form action="#" name="yui-classopts-form" method="get" id="yui-classopts-form">
                <fieldset>
                    <legend>Filters</legend>
                <span class="classopts"><input type="checkbox" name="show_private" id="show_private" /> <label for="show_private">Show Private</label></span>
                <span class="classopts"><input type="checkbox" name="show_protected" id="show_protected" /> <label for="show_protected">Show Protected</label></span>
                <span class="classopts"><input type="checkbox" name="show_deprecated" id="show_deprecated" /> <label for="show_deprecated">Show Deprecated</label></span>
                </fieldset>
            </form>

                   
                    <h3>Module: datatype
                    


                    </h3>
                    <div class="description summary">
                        The DataType Utility provides type-conversion and string-formatting
convenience methods for various JavaScript object types.
                    </div>



                <div class="yui-gc">
                    <div class="yui-u first">

                            <p>This module contains the following classes:</p>
                            <script>
                            //var YUI_CLASS_LIST = [{"extends": {"superclass": {}, "events": {}, "configs": {}, "properties": {}, "methods": {}}, "description": "DataType.Date provides a set of utility functions to operate against Date objects.", "guessedname": "DataType.Date", "name": "DataType.Date"}, {"extends": {"superclass": {}, "events": {}, "configs": {}, "properties": {}, "methods": {}}, "description": "The Date.Locale class is a container for all localised date strings\nused by Y.DataType.Date. It is used internally, but may be extended\nto provide new date localisations.\nTo create your own Locale, follow these steps:\n<ol>\n<li>Find an existing locale that matches closely with your needs<\/li>\n<li>Use this as your base class.  Use Y.DataType.Date.Locale[\"en\"] if nothing\nmatches.<\/li>\n<li>Create your own class as an extension of the base class using\nY.merge, and add your own localisations where needed.<\/li>\n<\/ol>\nSee the Y.DataType.Date.Locale[\"en-US\"] and Y.DataType.Date.Locale[\"en-GB\"]\nclasses which extend Y.DataType.Date.Locale[\"en\"].\nFor example, to implement locales for French french and Canadian french,\nwe would do the following:\n<ol>\n<li>For French french, we have no existing similar locale, so use\nY.DataType.Date.Locale[\"en\"] as the base, and extend it:\n<pre>\nY.DataType.Date.Locale[\"fr\"] = Y.merge(Y.DataType.Date.Locale, {\na: [\"dim\", \"lun\", \"mar\", \"mer\", \"jeu\", \"ven\", \"sam\"],\nA: [\"dimanche\", \"lundi\", \"mardi\", \"mercredi\", \"jeudi\", \"vendredi\", \"samedi\"],\nb: [\"jan\", \"f&eacute;v\", \"mar\", \"avr\", \"mai\", \"jun\", \"jui\", \"ao&ucirc;\", \"sep\", \"oct\", \"nov\", \"d&eacute;c\"],\nB: [\"janvier\", \"f&eacute;vrier\", \"mars\", \"avril\", \"mai\", \"juin\", \"juillet\", \"ao&ucirc;t\", \"septembre\", \"octobre\", \"novembre\", \"d&eacute;cembre\"],\nc: \"%a %d %b %Y %T %Z\",\np: [\"\", \"\"],\nP: [\"\", \"\"],\nx: \"%d.%m.%Y\",\nX: \"%T\"\n});\n<\/pre>\n<\/li>\n<li>For Canadian french, we start with French french and change the meaning of \\%x:\n<pre>\nY.DataType.Date.Locale[\"fr-CA\"] = Y.merge(Y.DataType.Date.Locale[\"fr\"], {\nx: \"%Y-%m-%d\"\n});\n<\/pre>\n<\/li>\n<\/ol>\nWith that, you can use your new locales:\n<pre>\nvar d = new Date(\"2008\/04\/22\");\nY.DataType.Date.format(d, { format: \"%A, %d %B == %x\", locale: \"fr\" });\n<\/pre>\nwill return:\n<pre>\nmardi, 22 avril == 22.04.2008\n<\/pre>\nAnd\n<pre>\nY.DataType.Date.format(d, {format: \"%A, %d %B == %x\", locale: \"fr-CA\" });\n<\/pre>\nWill return:\n<pre>\nmardi, 22 avril == 2008-04-22\n<\/pre>", "guessedname": "DataType.Date.Locale", "name": "DataType.Date.Locale"}, {"extends": {"superclass": {}, "events": {}, "configs": {}, "properties": {}, "methods": {}}, "description": "DataType.Number provides a set of utility functions to operate against Number objects.", "guessedname": "DataType.Number", "name": "DataType.Number"}, {"extends": {"superclass": {}, "events": {}, "configs": {}, "properties": {}, "methods": {}}, "description": "DataType.XML provides a set of utility functions to operate against XML documents.", "guessedname": "DataType.XML", "name": "DataType.XML"}];
                            </script>
                            <div id="splash_classList">
                                <ul>
                                    <li><a href="DataType.Date.html" title="DataType.Date" id="class_0">DataType.Date</a></li>
                                    <li><a href="DataType.Date.Locale.html" title="DataType.Date.Locale" id="class_1">DataType.Date.Locale</a></li>
                                    <li><a href="DataType.Number.html" title="DataType.Number" id="class_2">DataType.Number</a></li>
                                    <li><a href="DataType.XML.html" title="DataType.XML" id="class_3">DataType.XML</a></li>
                                </ul>
                            </div>
                    </div>
                    <div class="yui-u">
                                    <div class="submodules">
                                        <h4>Submodules:</h4> 
                                        <dl>
                                            <dt><code>datatype-date</code></dt>
                                            <dd>Date submodule.</dd>
                                            <dt><code>datatype-date-format</code></dt>
                                            <dd>Format date submodule implements strftime formatters for javascript based on the
Open Group specification defined at
http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html
This implementation does not include modified conversion specifiers (i.e., Ex and Ox)</dd>
                                            <dt><code>datatype-number-parse</code></dt>
                                            <dd>Parse number submodule.</dd>
                                            <dt><code>datatype-date-parse</code></dt>
                                            <dd>Parse number submodule.</dd>
                                            <dt><code>datatype-xml-parse</code></dt>
                                            <dd>Parse XML submodule.</dd>
                                            <dt><code>datatype-xml-format</code></dt>
                                            <dd>Format XML submodule.</dd>
                                            <dt><code>datatype-xml</code></dt>
                                            <dd>XML submodule.</dd>
                                            <dt><code>datatype-number</code></dt>
                                            <dd>Number submodule.</dd>
                                            <dt><code>datatype-number-format</code></dt>
                                            <dd>Format number submodule.</dd>
                                        </dl>
                                    </div>

                        </div>
                </div>

			</div>
		</div>
		<div class="yui-b">
            <div class="nav">

                    <div id="moduleList" class="module">
                        <h4>Modules</h4>
                        <ul class="content">
                                <li class=""><a href="module_anim.html" title="anim">anim</a></li>
                                <li class=""><a href="module_attribute.html" title="attribute">attribute</a></li>
                                <li class=""><a href="module_base.html" title="base">base</a></li>
                                <li class=""><a href="module_cache.html" title="cache">cache</a></li>
                                <li class=""><a href="module_classnamemanager.html" title="classnamemanager">classnamemanager</a></li>
                                <li class=""><a href="module_collection.html" title="collection">collection</a></li>
                                <li class=""><a href="module_console.html" title="console">console</a></li>
                                <li class=""><a href="module_console-filters.html" title="console-filters">console-filters</a></li>
                                <li class=""><a href="module_cookie.html" title="cookie">cookie</a></li>
                                <li class=""><a href="module_dataschema.html" title="dataschema">dataschema</a></li>
                                <li class=""><a href="module_datasource.html" title="datasource">datasource</a></li>
                                <li class="selected"><a href="module_datatype.html" title="datatype">datatype</a></li>
                                <li class=""><a href="module_dd.html" title="dd">dd</a></li>
                                <li class=""><a href="module_dom.html" title="dom">dom</a></li>
                                <li class=""><a href="module_dump.html" title="dump">dump</a></li>
                                <li class=""><a href="module_event.html" title="event">event</a></li>
                                <li class=""><a href="module_event-custom.html" title="event-custom">event-custom</a></li>
                                <li class=""><a href="module_event-simulate.html" title="event-simulate">event-simulate</a></li>
                                <li class=""><a href="module_history.html" title="history">history</a></li>
                                <li class=""><a href="module_imageloader.html" title="imageloader">imageloader</a></li>
                                <li class=""><a href="module_io.html" title="io">io</a></li>
                                <li class=""><a href="module_json.html" title="json">json</a></li>
                                <li class=""><a href="module_node.html" title="node">node</a></li>
                                <li class=""><a href="module_node-focusmanager.html" title="node-focusmanager">node-focusmanager</a></li>
                                <li class=""><a href="module_node-menunav.html" title="node-menunav">node-menunav</a></li>
                                <li class=""><a href="module_oop.html" title="oop">oop</a></li>
                                <li class=""><a href="module_overlay.html" title="overlay">overlay</a></li>
                                <li class=""><a href="module_plugin.html" title="plugin">plugin</a></li>
                                <li class=""><a href="module_profiler.html" title="profiler">profiler</a></li>
                                <li class=""><a href="module_queue.html" title="queue">queue</a></li>
                                <li class=""><a href="module_slider.html" title="slider">slider</a></li>
                                <li class=""><a href="module_stylesheet.html" title="stylesheet">stylesheet</a></li>
                                <li class=""><a href="module_substitute.html" title="substitute">substitute</a></li>
                                <li class=""><a href="module_test.html" title="test">test</a></li>
                                <li class=""><a href="module_widget.html" title="widget">widget</a></li>
                                <li class=""><a href="module_widget-position.html" title="widget-position">widget-position</a></li>
                                <li class=""><a href="module_widget-position-ext.html" title="widget-position-ext">widget-position-ext</a></li>
                                <li class=""><a href="module_widget-stack.html" title="widget-stack">widget-stack</a></li>
                                <li class=""><a href="module_widget-stdmod.html" title="widget-stdmod">widget-stdmod</a></li>
                                <li class=""><a href="module_yui.html" title="yui">yui</a></li>
                        </ul>
                    </div>

                    <div id="classList" class="module">
                        <h4>Classes</h4>
                        <ul class="content">
                                <li class=""><a href="DataType.Date.html" title="DataType.Date">DataType.Date</a></li>
                                <li class=""><a href="DataType.Date.Locale.html" title="DataType.Date.Locale">DataType.Date.Locale</a></li>
                                <li class=""><a href="DataType.Number.html" title="DataType.Number">DataType.Number</a></li>
                                <li class=""><a href="DataType.XML.html" title="DataType.XML">DataType.XML</a></li>
                        </ul>
                    </div>

                    <div id="fileList" class="module">
                        <h4>Files</h4>
                        <ul class="content">        
                                <li class=""><a href="datatype-date-format.js.html" title="datatype-date-format.js">datatype-date-format.js</a></li>
                                <li class=""><a href="datatype-date-locale.js.html" title="datatype-date-locale.js">datatype-date-locale.js</a></li>
                                <li class=""><a href="datatype-date-parse.js.html" title="datatype-date-parse.js">datatype-date-parse.js</a></li>
                                <li class=""><a href="datatype-number-format.js.html" title="datatype-number-format.js">datatype-number-format.js</a></li>
                                <li class=""><a href="datatype-number-parse.js.html" title="datatype-number-parse.js">datatype-number-parse.js</a></li>
                                <li class=""><a href="datatype-xml-format.js.html" title="datatype-xml-format.js">datatype-xml-format.js</a></li>
                                <li class=""><a href="datatype-xml-parse.js.html" title="datatype-xml-parse.js">datatype-xml-parse.js</a></li>
                        </ul>
                    </div>





            </div>
		</div>
	</div>
	<div id="ft">
        <hr />
        Copyright &copy; 2009 Yahoo! Inc. All rights reserved.
	</div>
</div>
<script type="text/javascript">
    ALL_YUI_PROPS = [{"access": "", "host": "DataType.Date", "name": "format", "url": "DataType.Date.html#method_format", "type": "method"}, {"access": "", "host": "DataType.XML", "name": "format", "url": "DataType.XML.html#method_format", "type": "method"}, {"access": "", "host": "DataType.Number", "name": "format", "url": "DataType.Number.html#method_format", "type": "method"}, {"access": "", "host": "DataType.Date", "name": "parse", "url": "DataType.Date.html#method_parse", "type": "method"}, {"access": "", "host": "DataType.XML", "name": "parse", "url": "DataType.XML.html#method_parse", "type": "method"}, {"access": "", "host": "DataType.Number", "name": "parse", "url": "DataType.Number.html#method_parse", "type": "method"}, {"access": "private", "host": "DataType.Date", "name": "xPad", "url": "DataType.Date.html#method_xPad", "type": "method"}];
</script>
</body>
</html>
